<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript">
function checkIt(){
	if(document.payment.bankSelect.value=="은행선택"){
		alert("은행을 선택하세요");
		document.payment.bankSelect.focus();
		return false;
	}
	if(document.payment.acc.value==""){
		alert("계좌번호를 입력하세요.");
		document.payment.acc.focus();
		return false;
	}
	if(document.payment.accpass.value==""){
		alert("계좌비밀번호를 입력하세요.");
		document.payment.accpass.focus();
		return false;
	}
	if(document.payment.accname.value==""){
		alert("입금자명을 입력하세요.");
		document.payment.accname.focus();
		return false;
	}
}
</script>
</head>
<body>
<form:form name="payment" commandName="milegeCommand" action="../main/paymentmilege.do" onsubmit="return checkIt()">
	<table>
		<tr><td><h1>끼리끼리결제</h1></td></tr>
		<tr>
			<td bgcolor="#cae3fc">
				결제 금액  </td><td> <input type="text" disabled value="${milegeCommand.mc_charge}">
						  <form:hidden value="${milegeCommand.mc_charge}" path="mc_charge"/>
						  <form:hidden value="${milegeCommand.mc_charge}" path="mc_price"/>
						  <form:hidden value="${userid}" path="userid"/>
			</td>
		</tr>
		<tr>
			<td colspan="2">
				끼리끼리 : 외환은행 119-18-343948<br>
				(이체 수수료는 없으니 걱정마세요)
			</td>
		</tr>
		<tr>
			<td  bgcolor="#cae3fc">
				은행  </td><td><form:select id="bankSelect" name="bankSelect" path="mc_bank">
						<form:option value="은행선택">은행선택</form:option>
						<form:option value="SC은행">SC은행</form:option>
						<form:option value="국민은행">국민은행</form:option>
						<form:option value="기업은행">기업은행</form:option>
						<form:option value="농협">농협</form:option>
						<form:option value="새마을금고">새마을금고</form:option>
						<form:option value="수협">수협</form:option>
						<form:option value="신한은행">신한은행</form:option>
						<form:option value="신협">신협</form:option>
						<form:option value="씨티은행">씨티은행</form:option>
						<form:option value="외환은행">외환은행</form:option>
						<form:option value="우리은행">우리은행</form:option>
						<form:option value="우체국">우체국</form:option>
						<form:option value="하나은행">하나은행</form:option>
						<form:option value="현대스위스저축은행">현대스위스저축은행</form:option>
					  </form:select>
					</td>
		</tr>
		<tr>
			<td  bgcolor="#cae3fc">
				계좌번호  </td><td><form:input type="text" id="acc" path="mc_accountnumber"/>
			</td>
		</tr>
		<tr>
			<td  bgcolor="#cae3fc">
				계좌비밀번호 </td><td><form:password  maxlength="4" id="accpass" path="mc_accountpasswd"/>
			</td>
		</tr>
		<tr>
			<td bgcolor="#cae3fc">
				입금자명 </td><td><form:input type="text" id="accname" path="mc_depositer"/>
			</td>
		</tr>
		<tr>
			<td align="center" colspan="2">
				<input type="submit" class="pay" value="결제">
				<input type="button" class="pay" value="취소" onclick="location.href='index.do'">
			</td>
		</tr>
	</table>
</form:form>
</body>
</html>